# Creating a new Holiday

This endpoint returns structured Holiday objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the `results` array
and will be indexed by ID in the `holidays` top-level JSON key.
Please see our [Response Format](#section/Response-Format) section for more information.

Endpoint: POST /holidays
Version: 1.0.0

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the `include` param, e.g. `include=association1,association2`.
- `holiday_calendar_associations` (HolidayCalendarAssociation) - The Holiday Calendar Associations for this Holiday.

  - `optional_fields` (array)
    Allows you to request one or more optional fields as an array.

## Request fields (application/json):

  - `holiday` (object)

  - `holiday.name` (string, required)
    The name of the holiday.

  - `holiday.start_date` (string, required)
    The date the holiday begins. The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `holiday.end_date` (string)
    The date the holiday ends. The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `holiday.paid` (boolean)
    Whether this time range is considered paid time off.

  - `holiday.holiday_calendar_ids` (array)
    The calendars to which this holiday belongs.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 401 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 403 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 404 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 422 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 503 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

